package com.example.file_explorer.vo;

import com.example.file_explorer.entity.FileNode;
import lombok.Data;

@Data
public class FileVo {
    private String fileName;
    private Long size; //文件大小
    private Long creationTime; //创建时间
    private Long lastAccessTime; //最后访问时间
    private Long lastModifiedTime; //最后修改时间
    private String path; // 该文件的路径

    public FileVo(FileNode fileNode, String path) {
        fileName = fileNode.getFileName();
        size = fileNode.getSize();
        creationTime = fileNode.getCreationTime();
        lastAccessTime = fileNode.getLastAccessTime();
        lastModifiedTime = fileNode.getLastModifiedTime();
        this.path = path;
    }
}